home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-serious-
/
sound
/
xgtoolset
/
source
/
xgvarfx
/
xgvarfx.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-06-14
|
100KB
|
3,013 lines
/*
XG-VariationFX-Editor V1.0
A Bars and Pipes tool for editing the DB50-XG-board from YAMAHA.
Especially the VariationFX-effects with all parameters.
Use it together with the XGMain.ptool form us.
© 1998 Alfred & Matthias Faust (father & son)
The Tool-code based farly on the code for the "pc3.ptool" from Richard
Hagen. That's a very good tool, many thanks to him.
Richard has written his tool with DICE. We altered the code to compile
with the free GNU-C-compiler of the ADE. Especially the part was
transcripted, that place the imagedate in chip-RAM, because the
GNU-C-compiler hasn't as yet a keyword like DICE or other compiler for
this.
This code is released into the Public Domain, and may be freely
distributed in its original form.
It is supplied ``as is'', and comes with no warranty. This program code
was released because it might be useful as a starting point for other
programmers. However, if any damage arises from its use, the original
author and we will not be held liable.
You are free to use and modify this code to your heart's content, provided
you acknowledge me as the original author in any code that you might
distribute which is based largely on this code.
I acknowledge that the design of this tool is influenced strongly by the
example code supplied with the Rules for Tools package. However, I have
made substantial contributions of my own.
Matthias & Alfred Faust
j.k.dax@t-online.de
History:
1.0 (26.11.1998)
Initial Release.
*/
#include "bars.h"
#include "myheader.h" // from R.Hagen
#include <libraries/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include <exec/memory.h>
#include <exec/execbase.h>
#include <exec/types.h>
#include <string.h>
#include <intuition/intuition.h>
char version[]="\0$VER:XG-VarFX-Edit 1.0 (26.11.98) © Alfred & Matthias Faust";
#define VXXG_NAME "XG-VarFX-Edit"
#define VXXG_ID 0x56585847
#define VXXG_TYPE (TOOL_NORMAL | TOOL_NOTPAD)
// Variations-Effects
#define hall1 0
#define hall2 1
#define room1 2
#define room2 3
#define room3 4
#define stage1 5
#define stage2 6
#define plate 7
#define delaylcr 8
#define delaylr 9
#define echo 10
#define crossdelay 11
#define earlyrefl1 12
#define earlyrefl2 13
#define gatereverb 14
#define reversegate 15
#define karaoke1 16
#define karaoke2 17
#define karaoke3 18
#define chorus1 19
#define chorus2 20
#define chorus3 21
#define chorus4 22
#define celeste1 23
#define celeste2 24
#define celeste3 25
#define celeste4 26
#define flanger1 27
#define flanger2 28
#define flanger3 29
#define symphonic 30
#define rotaryspeaker 31
#define tremolo 32
#define autopan 33
#define phaser1 34
#define phaser2 35
#define distortion 36
#define overdrive 37
#define guitaramp 38
#define autowah 39
#define monoeq 40
#define stereoeq 41
char typehexstr[42][4]={
"0100","0101","0200","0201","0202", // hall1+2,room1-3
"0300","0301","0400", // stage1+2, plate
"0500","0600","0700","0800", // delayLCR, delayLR, echo, cross delay
"0900","0901", // early reflection 1+2
"0a00","0b00", // gate reverse, reverse gate
"1400","1401","1402", // karaoke 1-3
"4100","4101","4102","4108", // chorus 1-4
"4200","4201","4202","4208", // celeste 1-4
"4300","4301","4308", // flanger 1-3
"4400","4500","4600","4700", // symphonic, rotary speaker, tremolo, auto pan
"4800","4808", // phaser 1+2
"4900","4a00", // disortion, overdrive
"4b00","4e00", // guitar amp, auto wah
"4c00","4d00" // 3-band-equalizer(mono), 2-band-equalizer(stereo)
};
extern struct ExecBase * SysBase;
/* the litte Icon in the pipeline */
UWORD *VXXG=NULL;
static UWORD VXXGdata[] =
{
/* Plane 0 */
0x7FFF,0xFE00,
0x7FFF,0xFE00,
0x7FFF,0xFE00,
0x7DDF,0x7600,
0x796B,0xAE00,
0x61DE,0xDE00,
0x61BB,0xDE00,
0x79FB,0xAE00,
0x7DBB,0x7600,
0x7FFF,0xFE00,
0x7FFF,0xFE00,
0x7FFF,0xFE00,
/* Plane 1 */
0x0000,0x0200,
0x0000,0x0600,
0x1FFF,0xFE00,
0x1F30,0x6600,
0x9ED3,0x0F00,
0x87B0,0x9F00,
0x8773,0x9F00,
0x9FF3,0x0F00,
0x1F72,0x6600,
0x1FFF,0xFE00,
0x1FFF,0xFE00,
0x3FFF,0xFE00,
/* Plane 2 */
0x0000,0x0000,
0x0000,0x0000,
0x1FFF,0xF800,
0x1FDF,0xF800,
0x1F6F,0xF800,
0x1FDF,0xF800,
0x1FBF,0xF800,
0x1FFF,0xF800,
0x1FBF,0xF800,
0x1FFF,0xF800,
0x0000,0x0000,
0x0000,0x0000
};
static struct Image VXXG_image = {
0, 0,
24 , 12 , 3 ,
NULL,
0x1f, 0x00,
NULL
};
//Definitions of the gadgets
#define VXTYPE_GADGET 1
#define VXTYPEDOWN_GADGET 2
#define VXTYPEUP_GADGET 3
#define VXONE_GADGET 4
#define VXONEDOWN_GADGET 5
#define VXONEUP_GADGET 6
#define VXTWO_GADGET 7
#define VXTWODOWN_GADGET 8
#define VXTWOUP_GADGET 9
#define VXTHREE_GADGET 10
#define VXTHREEDOWN_GADGET 11
#define VXTHREEUP_GADGET 12
#define VXFOUR_GADGET 13
#define VXFOURDOWN_GADGET 14
#define VXFOURUP_GADGET 15
#define VXFIVE_GADGET 16
#define VXFIVEDOWN_GADGET 17
#define VXFIVEUP_GADGET 18
#define VXSIX_GADGET 19
#define VXSIXDOWN_GADGET 20
#define VXSIXUP_GADGET 21
#define VXSEVEN_GADGET 22
#define VXSEVENDOWN_GADGET 23
#define VXSEVENUP_GADGET 24
#define VXEIGHT_GADGET 25
#define VXEIGHTDOWN_GADGET 26
#define VXEIGHTUP_GADGET 27
#define VXNINE_GADGET 28
#define VXNINEDOWN_GADGET 29
#define VXNINEUP_GADGET 30
#define VXTEN_GADGET 31
#define VXTENDOWN_GADGET 32
#define VXTENUP_GADGET 33
#define VXELEVEN_GADGET 34
#define VXELEVENDOWN_GADGET 35
#define VXELEVENUP_GADGET 36
#define VXTWELVE_GADGET 37
#define VXTWELVEDOWN_GADGET 38
#define VXTWELVEUP_GADGET 39
#define VXTHIRTEEN_GADGET 40
#define VXTHIRTEENDOWN_GADGET 41
#define VXTHIRTEENUP_GADGET 42
#define VXFOURTEEN_GADGET 43
#define VXFOURTEENDOWN_GADGET 44
#define VXFOURTEENUP_GADGET 45
#define VXFIFTEEN_GADGET 46
#define VXFIFTEENDOWN_GADGET 47
#define VXFIFTEENUP_GADGET 48
#define VXSIXTEEN_GADGET 49
#define VXSIXTEENDOWN_GADGET 50
#define VXSIXTEENUP_GADGET 51
#define VXSEVENTEEN_GADGET 52
#define VXSEVENTEENDOWN_GADGET 53
#define VXSEVENTEENUP_GADGET 54
#define VXEIGHTEEN_GADGET 55
#define VXEIGHTEENDOWN_GADGET 56
#define VXEIGHTEENUP_GADGET 57
#define VXNINETEEN_GADGET 58
#define VXNINETEENDOWN_GADGET 59
#define VXNINETEENUP_GADGET 60
#define VXTWENTY_GADGET 61
#define VXTWENTYDOWN_GADGET 62
#define VXTWENTYUP_GADGET 63
#define VXTWENTYONE_GADGET 64
#define VXTWENTYONEDOWN_GADGET 65
#define VXTWENTYONEUP_GADGET 66
#define WRITE_GADGET 67
//all the gadgets
/* VariationFX-Type-Gadget */
struct PropInfo VXXGGadget1SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage1 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct IntuiText VXXGIText1 = {
2, 0, JAM1, -78, 1, NULL, "VarFXType", NULL
};
struct Gadget VXXGGadget1 = {
NULL, 85, 31, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage1, NULL, &VXXGIText1, NULL, (APTR)&VXXGGadget1SInfo, VXTYPE_GADGET, NULL
};
/* VariationFX-one-Gadget */
struct PropInfo VXXGGadget2SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage2 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget2 = {
&VXXGGadget1, 85, 42, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage2, NULL, NULL, NULL, (APTR)&VXXGGadget2SInfo, VXONE_GADGET, NULL
};
/* VariationFX-two-Gadget */
struct PropInfo VXXGGadget3SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage3 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget3 = {
&VXXGGadget2, 85, 53, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage3, NULL, NULL, NULL, (APTR)&VXXGGadget3SInfo, VXTWO_GADGET, NULL
};
//VariationFX-three-Gadget
struct PropInfo VXXGGadget4SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage4 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget4 = {
&VXXGGadget3, 85, 64, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage4, NULL, NULL, NULL, (APTR)&VXXGGadget4SInfo, VXTHREE_GADGET, NULL
}; // VXTHREE_GADGET
//VariationFX-four-Gadget
struct PropInfo VXXGGadget5SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage5 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget5 = {
&VXXGGadget4, 85, 75, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage5, NULL, NULL, NULL, (APTR)&VXXGGadget5SInfo, VXFOUR_GADGET, NULL
}; //VXFOUR_GADGET
//VariationFX-five-Gadget
struct PropInfo VXXGGadget6SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage6 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget6 = {
&VXXGGadget5, 85, 86, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage6, NULL, NULL, NULL, (APTR)&VXXGGadget6SInfo, VXFIVE_GADGET, NULL
}; //VXFIVE_GADGET
//VariationFX-six-Gadget
struct PropInfo VXXGGadget7SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage7 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget7 = {
&VXXGGadget6, 85, 97, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage7, NULL, NULL, NULL, (APTR)&VXXGGadget7SInfo, VXSIX_GADGET, NULL
}; //VXSIX_GADGET
//VariationFX-seven-Gadget
struct PropInfo VXXGGadget8SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage8 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget8 = {
&VXXGGadget7, 85, 108, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage8, NULL, NULL, NULL, (APTR)&VXXGGadget8SInfo, VXSEVEN_GADGET, NULL
}; //VXSEVEN_GADGET
//VariationFX-eight-Gadget
struct PropInfo VXXGGadget9SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage9 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget9 = {
&VXXGGadget8, 85, 119, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage9, NULL, NULL, NULL, (APTR)&VXXGGadget9SInfo, VXEIGHT_GADGET, NULL
}; //VXEIGHT_GADGET
//VariationFX-nine-Gadget
struct PropInfo VXXGGadget10SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage10 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget10 = {
&VXXGGadget9, 85, 130, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage10, NULL, NULL, NULL, (APTR)&VXXGGadget10SInfo, VXNINE_GADGET, NULL
}; //VXNINE_GADGET
//VariationFX-ten-Gadget
struct PropInfo VXXGGadget11SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage11 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget11 = {
&VXXGGadget10, 85, 141, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage11, NULL, NULL, NULL, (APTR)&VXXGGadget11SInfo, VXTEN_GADGET, NULL
}; //VXTEN_GADGET
//VariationFX-eleven-Gadget
struct PropInfo VXXGGadget12SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage12 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget12 = {
&VXXGGadget11, 85, 152, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage12, NULL, NULL, NULL, (APTR)&VXXGGadget12SInfo, VXELEVEN_GADGET, NULL
}; //VXELEVEN_GADGET
//VariationFX-twelve-Gadget
struct PropInfo VXXGGadget13SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage13 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget13 = {
&VXXGGadget12, 85, 163, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage13, NULL, NULL, NULL, (APTR)&VXXGGadget13SInfo, VXTWELVE_GADGET, NULL
}; //VXTWELVE_GADGET
//VariationFX-thirteen-Gadget
struct PropInfo VXXGGadget14SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage14 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget14 = {
&VXXGGadget13, 85, 174, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage14, NULL, NULL, NULL, (APTR)&VXXGGadget14SInfo, VXTHIRTEEN_GADGET, NULL
}; //VXTHIRTEEN_GADGET
//VariationFX-fourteen-Gadget
struct PropInfo VXXGGadget15SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage15 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget15 = {
&VXXGGadget14, 85, 185, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage15, NULL, NULL, NULL, (APTR)&VXXGGadget15SInfo, VXFOURTEEN_GADGET, NULL
}; //VXFOURTEEN_GADGET
//VariationFX-fifteen-Gadget
struct PropInfo VXXGGadget16SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage16 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget16 = {
&VXXGGadget15, 85, 196, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage16, NULL, NULL, NULL, (APTR)&VXXGGadget16SInfo, VXFIFTEEN_GADGET, NULL
}; //VXFIFTEEN_GADGET
//VariationFX-sixteen-Gadget
struct PropInfo VXXGGadget17SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage17 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget17 = {
&VXXGGadget16, 85, 207, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage17, NULL, NULL, NULL, (APTR)&VXXGGadget17SInfo, VXSIXTEEN_GADGET, NULL
}; //VXSIXTEEN_GADGET
//VariationFX-seventeen-Gadget
struct PropInfo VXXGGadget18SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage18 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget18 = {
&VXXGGadget17, 85, 218, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage18, NULL, NULL, NULL, (APTR)&VXXGGadget18SInfo, VXSEVENTEEN_GADGET, NULL
}; //VXSEVENTEEN_GADGET
//VariationFX-eighteen-Gadget
struct PropInfo VXXGGadget19SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage19 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget19 = {
&VXXGGadget18, 85, 229, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage19, NULL, NULL, NULL, (APTR)&VXXGGadget19SInfo, VXEIGHTEEN_GADGET, NULL
}; //VXeighteen_GADGET
//VariationFX-nineteen-Gadget
struct PropInfo VXXGGadget20SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage20 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget20 = {
&VXXGGadget19, 85, 240, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage20, NULL, NULL, NULL, (APTR)&VXXGGadget20SInfo, VXNINETEEN_GADGET, NULL
}; //VXNINETEEN_GADGET
//VariationFX-twenty-Gadget
struct PropInfo VXXGGadget21SInfo = {
AUTOKNOB+FREEHORIZ, -16384, -1, 16384, -1,
};
struct Image VXXGImage21 = {
0, 0, 102, 6, 0, NULL, 0x0000, 0x0000, NULL
};
struct Gadget VXXGGadget21 = {
&VXXGGadget20, 85, 251, 150, 9, GFLG_GADGHBOX|GFLG_GADGHIMAGE, RELVERIFY|GADGIMMEDIATE, PROPGADGET,
(APTR)&VXXGImage21, NULL, NULL, NULL, (APTR)&VXXGGadget21SInfo, VXTWENTY_GADGET, NULL
}; //VXTWENTY_GADGET
/* Test gadget. */
struct IntuiText VXXGIText22 = {
4,0,JAM1,4,2,NULL,"Write",NULL
};
struct Gadget VXXGGadget22 = {
&VXXGGadget21,117,269,45,11,GFLG_GADGHBOX|GFLG_GADGHIMAGE,RELVERIFY|GADGIMMEDIATE,BOOLGADGET,
(APTR)NULL,NULL,&VXXGIText22,NULL,NULL,WRITE_GADGET,NULL
};
//the mainwindowstructure
struct NewWindow VXXGNewWindowStructure1 = {
5, 167,
275, 290,
0, 6,
GADGETDOWN|GADGETUP|CLOSEWINDOW,
WINDOWDRAG|WINDOWDEPTH|WINDOWCLOSE|ACTIVATE|NOCAREREFRESH,
&VXXGGadget22,
NULL,
"XGVariationFX-Editor",
NULL,
NULL,
5, 5,
-1, -1,
CUSTOMSCREEN
};
struct VXXGTool {
struct Tool tool;
UBYTE vrfxtype;
UBYTE vrfxone;
UBYTE vrfxtwo;
UBYTE vrfxthree;
UBYTE vrfxfour;
UBYTE vrfxfive;
UBYTE vrfxsix;
UBYTE vrfxseven;
UBYTE vrfxeight;
UBYTE vrfxnine;
UBYTE vrfxten;
UBYTE vrfxeleven;
UBYTE vrfxtwelve;
UBYTE vrfxthirteen;
UBYTE vrfxfourteen;
UBYTE vrfxfifteen;
UBYTE vrfxsixteen;
UBYTE vrfxseventeen;
UBYTE vrfxeighteen;
UBYTE vrfxnineteen;
UBYTE vrfxtwenty;
char *typesysex;
char *onesysex;
char *twosysex;
char *threesysex;
char *foursysex;
char *fivesysex;
char *sixsysex;
char *sevensysex;
char *eightsysex;
char *ninesysex;
char *tensysex;
char *elevensysex;
char *twelvesysex;
char *thirteensysex;
char *fourteensysex;
char *fifteensysex;
char *sixteensysex;
char *seventeensysex;
char *eighteensysex;
char *nineteensysex;
char *twentysysex;
};
int typeval;
static struct ToolMaster master;
extern struct Functions *functions;
//initial values
static void VXXG_tool_init(struct VXXGTool *tool)
{
tool->vrfxtype = 0x08;
tool->vrfxone = 0x1a;
tool->vrfxtwo = 0x0d;
tool->vrfxthree = 0x27;
tool->vrfxfour = 0x27;
tool->vrfxfive = 0x4a;
tool->vrfxsix = 0x64;
tool->vrfxseven = 0x0a;
tool->vrfxeight = 0x00;
tool->vrfxnine = 0x00;
tool->vrfxten = 0x20;
tool->vrfxeleven = 0x40;
tool->vrfxtwelve = 0x40;
tool->vrfxthirteen = 0x00;
tool->vrfxfourteen = 0x00;
tool->vrfxfifteen = 0x00;
tool->vrfxsixteen = 0x00;
tool->vrfxseventeen = 0x14;
tool->vrfxeighteen = 0x0c;
tool->vrfxnineteen = 0x12;
tool->vrfxtwenty = 0x0c;
tool->typesysex = NULL;
tool->onesysex = NULL;
tool->twosysex = NULL;
tool->threesysex = NULL;
tool->foursysex = NULL;
tool->fivesysex = NULL;
tool->sixsysex = NULL;
tool->sevensysex = NULL;
tool->eightsysex = NULL;
tool->ninesysex = NULL;
tool->tensysex = NULL;
tool->elevensysex = NULL;
tool->twelvesysex = NULL;
tool->thirteensysex = NULL;
tool->fourteensysex = NULL;
tool->fifteensysex = NULL;
tool->sixteensysex = NULL;
tool->seventeensysex = NULL;
tool->eighteensysex = NULL;
tool->nineteensysex = NULL;
tool->twentysysex = NULL;
tool->tool.touched = TOUCH_INIT;
}
static struct Event * __saveds processeventcode(struct Event *event)
{
event->tool = event->tool->next;
return(event);
}
// the routine for sending SysEx-data thru the pipeline
static void __saveds sendsysex(char *buff, short size, struct VXXGTool *tool, const LONG time)
{
struct StringEvent *event;
struct String *string;
event = (struct StringEvent *) (*functions->allocevent)();
if (event)
{
string = (struct String *) (*functions->myalloc)(size + 3, MEMF_CLEAR);
if (string)
{
event->string = string;
memcpy(string->string, buff, size);
string->length = size + 2;
event->type = EVENT_SYSX;
event->status = MIDI_SYSX;
event->time = time;
event->tool = tool->tool.next;
WaitTOF();
(*functions->qevent)(event);
(*functions->myfree)(string);
}
}
}
//the necessary functions for writing to track
static BOOL lock_clip(struct Clip *clip)
{
Forbid();
if (clip->locked == 0)
{
clip->locked = 1;
Permit();
return TRUE;
}
else
{
Permit();
return FALSE;
}
}
static void unlock_clip(struct Clip *clip)
{
clip->locked = 0;
}
//writes sysex into track
static void __saveds insertsysex(char *buff, short size, struct VXXGTool *tool, const LONG time)
{
struct StringEvent *event;
struct String *string;
event = (struct StringEvent *) (*functions->allocevent)();
if (event)
{
string = (struct String *) (*functions->myalloc)(size + 3, MEMF_CLEAR);
if (string)
{
event->next = NULL;
event->string = string;
memcpy(string->string, buff, size);
string->length = size + 2;
event->type = EVENT_SYSX;
event->status = MIDI_SYSX;
event->time = time;
event->tool = tool->tool.next;
if (lock_clip(&(tool->tool.track->clip)))
{
event->next = (struct StringEvent *)tool->tool.track->clip.events.first;
tool->tool.track->clip.events.first = (struct Event *)(*functions->sorteventlist)(event);
unlock_clip(&(tool->tool.track->clip));
}
else
{
(*functions->freelist)(event);
}
}
}
}
static void __saveds transsysex(struct VXXGTool *tool, const LONG time, char *sysx, short sel)
{
LONG size;
int a, b, x, y ;
UBYTE abuf[32];
char chr[4];
char *zbuf = NULL;
//translate tool->typesysexer into hex
size = strlen(sysx);
zbuf = (char *)AllocVec(size+2, MEMF_ANY|MEMF_CLEAR);
if(zbuf)
{
CopyMem(sysx, zbuf, size);
b=0;
for(a=0;a < size;a=a+2)
{
chr[0] = zbuf[a];
chr[1] = zbuf[a+1];
x=(isdigit((int)chr[0]))? (chr[0]&0xF) : ((chr[0]&0xDF)-55); //this is the
y=(isdigit((int)chr[1]))? (chr[1]&0xF) : ((chr[1]&0xDF)-55); //the translate-core
abuf[b++] = ((x<<4)|y); //writing with bitmanipulation
}
//send hexdata
FreeVec(zbuf);
if (sel == 0) insertsysex(abuf, b, tool, time);
if (sel == 1) sendsysex(abuf, b, tool, time);
}
}
//displays the slider-label
void __saveds label(struct RastPort *rp, int y, char *textt)
{
char text[10];
sprintf(text, "%9.9s", textt);
Move(rp, 7, y);
Text(rp, text, 9);
}
//displays the selection in the slider-labels
void __saveds select(struct RastPort *rp, int y, char *textt, UBYTE zahl)
{
char text[6];
sprintf(text, "%6.6s", textt);
Move(rp, 7, y);
Text(rp, text, 9);
}
// Writes all values of the sliders and more in the main window
LONG __saveds display_routine(struct Window *window, struct Gadget *gadget, ULONG value)
{
int i=0;
char *vrfxtypet, *inputt, *atypt, *ertypt, *pdirt;
char text[10];
char vrfxtypetext[20];
char inputtext[6];
char atyptext[6];
char ertyptext[6];
char pdirtext[6];
char name[15];
const short id = gadget->GadgetID;
struct RastPort *rp = window->RPort;
char vrfxtypename[42][17]={
"Hall 1 ","Hall 2 ","Room 1 ","Room 2 ","Room 3 ",
"Stage 1 ","Stage 2 ","Plate ","Delay LCR ","Delay LR ",
"Echo ","Cross Delay ","EarlyReflection 1","EarlyReflection 2","Gate Reverb ",
"Reverse Gate ","Karaoke 1 ","Karaoke 2 ","Karaoke 3 ","Chorus 1 ",
"Chorus 2 ","Chorus 3 ","Chorus 4 ","Celeste 1 ","Celeste 2 ",
"Celeste 3 ","Celeste 4 ","Flanger 1 ","Flanger 2 ","Flanger 3 ",
"Symphonic ","Rotary Speaker ","Tremolo ","Auto Pan ","Phaser 1 ",
"Phaser 2 ","Distortion ","Overdrive ","Guitar Amplifier ","Auto Wah ",
"3-Band-Equalizer ","2-Band-Equalizer "};
char propname[62][9]={
" ", // 0
"AM Depth ", // 1
"ATyp ", // 2
"CchDelay ", // 3
"CchLevel ", // 4
"CtofFrqOf", // 5
"Delay2Lvl", // 6
"DelayOffs", // 7
"DelayTime", // 8
"Density ", // 9
"Diffusion", // 10
"Drive ", // 11
"Dry<->Wet", // 12
"EdgClpCve", // 13
"EqHigFreq", // 14
"EqHigGain", // 15
"EqLowFreq", // 16
"EqLowGain", // 17
"EqMidFreq", // 18
"EqMidGain", // 19
"EqMidWdth", // 20
"LFOPhDiff", // 21
"ERTyp ", // 22
"F/R Depth", // 23
"FeedbLevl", // 24
"FeedbDlay", // 25
"FeedbDly1", // 26
"FeedbDly2", // 27
"HighDamp ", // 28
"HpfCutoff", // 29
"InitDelay", // 30
"Input: ", // 31
"L->RDelay", // 32
"L/R Depth", // 33
"LchDelay ", // 34
"LchDelay1", // 35
"LchDelay2", // 36
"LchFdbLvl", // 37
"LFOFreqnc", // 38
"LFODepth ", // 39
"Liveness ", // 40
"LpfCutoff", // 41
"OutputLvl", // 42
"PDir ", // 43
"PhShtOffs", // 44
"PM Depth ", // 45
"R->LDelay", // 46
"RchDelay ", // 47
"RchDelay1", // 48
"RchDelay2", // 49
"RchFdbLvl", // 50
"Resonance", // 51
"RevTime ", // 52
"RoomSize ", // 53
"SndVxtoCh", // 54
"SndVxtoRv", // 55
"Typ: ", // 56
"Stage ", // 57
"VarPan ", // 58
"VarReturn", // 59
"RevDelay ", // 60
"Er/RevBal"}; // 61
char input[7][2]={
"Mo","St"," L"," R","LR"," A"," B"};
char atyp[4][5]={
" off","Stack","Combo"," Tube"};
char ertyp[6][3]={
"S-H","L-H","Rdm","Rvs","Plt","Spr"};
char pdir[6][4]={
"L<>R"," L>R"," R>L","Ltrn","Rtrn"," L.R"};
switch (id)
{
case VXTYPE_GADGET:
vrfxtypet = vrfxtypename[value];
sprintf(vrfxtypetext, "%17.17s", vrfxtypet);
SetAPen(rp, 7);
SetBPen(rp, 6);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 83, 26);
Text(rp, vrfxtypetext, 17);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
if ((value == hall1)|
(value == hall2)|
(value == room1)|
(value == room2)|
(value == room3)|
(value == stage1)|
(value == stage2)|
(value == plate))
{
label(rp, 49,propname[52]);
label(rp, 60,propname[10]);
label(rp, 71,propname[30]);
label(rp, 82,propname[29]);
label(rp, 93,propname[41]);
label(rp,104,propname[0]);
label(rp,115,propname[0]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[12]);
if ((value == hall1)|(value == stage1))
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[0]);
label(rp,214,propname[60]);
label(rp,225,propname[9]);
label(rp,236,propname[61]);
label(rp,247,propname[24]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == delaylcr)
{
label(rp, 49,propname[34]); //42
label(rp, 60,propname[47]); //44
label(rp, 71,propname[3]); //46
label(rp, 82,propname[25]); //48
label(rp, 93,propname[24]); //4a
label(rp,104,propname[4]); //4c
label(rp,115,propname[28]); //4e
label(rp,126,propname[0]); //50
label(rp,137,propname[0]); //52
label(rp,148,propname[12]); //54
label(rp,159,propname[59]); //56
label(rp,170,propname[58]); //57
label(rp,181,propname[55]); //58
label(rp,192,propname[54]); //59
label(rp,203,propname[0]); //70
label(rp,214,propname[0]); //71
label(rp,225,propname[16]); //72
label(rp,236,propname[17]); //73
label(rp,247,propname[14]); //74
label(rp,258,propname[15]); //75
SetAPen(rp, 1);
}
else if (value == delaylr)
{
label(rp, 49,propname[34]); //42
label(rp, 60,propname[47]); //44
label(rp, 71,propname[26]); //46
label(rp, 82,propname[27]); //48
label(rp, 93,propname[24]); //4a
label(rp,104,propname[28]); //4c
label(rp,115,propname[0]); //4e
label(rp,126,propname[0]); //50
label(rp,137,propname[0]); //52
label(rp,148,propname[12]); //54
label(rp,159,propname[59]); //56
label(rp,170,propname[58]); //57
label(rp,181,propname[55]); //58
label(rp,192,propname[54]); //59
label(rp,203,propname[0]); //70
label(rp,214,propname[0]); //71
label(rp,225,propname[16]); //72
label(rp,236,propname[17]); //73
label(rp,247,propname[14]); //74
label(rp,258,propname[15]); //75
SetAPen(rp, 1);
}
else if (value == echo)
{
label(rp, 49,propname[35]); //42
label(rp, 60,propname[37]); //44
label(rp, 71,propname[48]); //46
label(rp, 82,propname[50]); //48
label(rp, 93,propname[28]); //4a
label(rp,104,propname[36]); //4c
label(rp,115,propname[49]); //4e
label(rp,126,propname[6]); //50
label(rp,137,propname[0]); //52
label(rp,148,propname[12]); //54
label(rp,159,propname[59]); //56
label(rp,170,propname[58]); //57
label(rp,181,propname[55]); //58
label(rp,192,propname[54]); //59
label(rp,203,propname[0]); //70
label(rp,214,propname[0]); //71
label(rp,225,propname[16]); //72
label(rp,236,propname[17]); //73
label(rp,247,propname[14]); //74
label(rp,258,propname[15]); //75
SetAPen(rp, 1);
}
else if (value == crossdelay)
{
label(rp, 49,propname[32]); //42
label(rp, 60,propname[46]); //44
label(rp, 71,propname[24]); //46
label(rp, 82,propname[31]); //48
label(rp, 93,propname[28]); //4a
label(rp,104,propname[0]); //4c
label(rp,115,propname[0]); //4e
label(rp,126,propname[0]); //50
label(rp,137,propname[0]); //52
label(rp,148,propname[12]); //54
label(rp,159,propname[59]); //56
label(rp,170,propname[58]); //57
label(rp,181,propname[55]); //58
label(rp,192,propname[54]); //59
label(rp,203,propname[0]); //70
label(rp,214,propname[0]); //71
label(rp,225,propname[16]); //72
label(rp,236,propname[17]); //73
label(rp,247,propname[14]); //74
label(rp,258,propname[15]); //75
SetAPen(rp, 1);
}
else if ((value == earlyrefl1)|
(value == earlyrefl2))
{
label(rp, 49,propname[22]);
label(rp, 60,propname[53]);
label(rp, 71,propname[30]);
label(rp, 82,propname[10]);
label(rp, 93,propname[24]);
label(rp,104,propname[29]);
label(rp,115,propname[41]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[40]);
label(rp,214,propname[9]);
label(rp,225,propname[28]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == gatereverb)|
(value == reversegate))
{
label(rp, 49,propname[56]);
label(rp, 60,propname[53]);
label(rp, 71,propname[10]);
label(rp, 82,propname[30]);
label(rp, 93,propname[24]);
label(rp,104,propname[29]);
label(rp,115,propname[41]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[40]);
label(rp,214,propname[9]);
label(rp,225,propname[28]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == karaoke1)|
(value == karaoke2)|
(value == karaoke3))
{
label(rp, 49,propname[8]);
label(rp, 60,propname[24]);
label(rp, 71,propname[29]);
label(rp, 82,propname[41]);
label(rp, 93,propname[0]);
label(rp,104,propname[0]);
label(rp,115,propname[0]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[12]);
if (value == karaoke1)
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == chorus1)|
(value == chorus2)|
(value == chorus3)|
(value == chorus4)|
(value == celeste1)|
(value == celeste2)|
(value == celeste3)|
(value == celeste4))
{
label(rp, 49,propname[38]);
label(rp, 60,propname[39]);
label(rp, 71,propname[24]);
label(rp, 82,propname[7]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
if ((value == chorus1)|(value == celeste1))
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[31]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == flanger1)|
(value == flanger2)|
(value == flanger3))
{
label(rp, 49,propname[38]);
label(rp, 60,propname[39]);
label(rp, 71,propname[24]);
label(rp, 82,propname[7]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
if (value == flanger1)
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[21]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == symphonic)|
(value == rotaryspeaker))
{
label(rp, 49,propname[38]);
label(rp, 60,propname[39]);
label(rp, 71,propname[7]);
label(rp, 82,propname[0]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == tremolo)
{
label(rp, 49,propname[38]);
label(rp, 60,propname[1]);
label(rp, 71,propname[45]);
label(rp, 82,propname[0]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[21]);
label(rp,247,propname[31]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == autopan)
{
label(rp, 49,propname[38]);
label(rp, 60,propname[33]);
label(rp, 71,propname[23]);
label(rp, 82,propname[43]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == phaser1)|
(value == phaser2))
{
label(rp, 49,propname[38]);
label(rp, 60,propname[39]);
label(rp, 71,propname[44]);
label(rp, 82,propname[24]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
if (value == phaser1)
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[57]);
label(rp,214,propname[10]);
label(rp,225,propname[21]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if ((value == distortion)|
(value == overdrive))
{
label(rp, 49,propname[11]);
label(rp, 60,propname[16]);
label(rp, 71,propname[17]);
label(rp, 82,propname[41]);
label(rp, 93,propname[42]);
label(rp,104,propname[0]);
label(rp,115,propname[18]);
label(rp,126,propname[19]);
label(rp,137,propname[20]);
label(rp,148,propname[12]);
if (value == distortion)
{
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
}
else
{
label(rp,159,propname[0]);
label(rp,170,propname[0]);
label(rp,181,propname[0]);
label(rp,192,propname[0]);
}
label(rp,203,propname[13]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == guitaramp)
{
label(rp, 49,propname[11]);
label(rp, 60,propname[2]);
label(rp, 71,propname[41]);
label(rp, 82,propname[42]);
label(rp, 93,propname[0]);
label(rp,104,propname[0]);
label(rp,115,propname[0]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[0]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[13]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == autowah)
{
label(rp, 49,propname[38]);
label(rp, 60,propname[39]);
label(rp, 71,propname[5]);
label(rp, 82,propname[51]);
label(rp, 93,propname[0]);
label(rp,104,propname[16]);
label(rp,115,propname[17]);
label(rp,126,propname[14]);
label(rp,137,propname[15]);
label(rp,148,propname[12]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == monoeq)
{
label(rp, 49,propname[17]);
label(rp, 60,propname[18]);
label(rp, 71,propname[19]);
label(rp, 82,propname[20]);
label(rp, 93,propname[15]);
label(rp,104,propname[16]);
label(rp,115,propname[14]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[0]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
else if (value == stereoeq)
{
label(rp, 49,propname[16]);
label(rp, 60,propname[17]);
label(rp, 71,propname[14]);
label(rp, 82,propname[15]);
label(rp, 93,propname[0]);
label(rp,104,propname[0]);
label(rp,115,propname[0]);
label(rp,126,propname[0]);
label(rp,137,propname[0]);
label(rp,148,propname[0]);
label(rp,159,propname[59]);
label(rp,170,propname[58]);
label(rp,181,propname[55]);
label(rp,192,propname[54]);
label(rp,203,propname[0]);
label(rp,214,propname[0]);
label(rp,225,propname[0]);
label(rp,236,propname[0]);
label(rp,247,propname[0]);
label(rp,258,propname[0]);
SetAPen(rp, 1);
}
Move(rp, 240, 37);
break;
case VXONE_GADGET:
if ((typeval == gatereverb)|(typeval == reversegate))
{
inputt = input[value+5];
sprintf(inputtext, "%2.2s", inputt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 50, 49);
Text(rp, inputtext, 2);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if ((typeval == earlyrefl1)||(typeval == earlyrefl2))
{
ertypt = ertyp[value];
sprintf(ertyptext, "%3.3s", ertypt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 50, 49);
Text(rp, ertyptext, 3);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if (typeval == monoeq) value = value + 0x34;
if (typeval == stereoeq) value = value + 0x08;
Move(rp, 240, 48);
break;
case VXTWO_GADGET:
if (typeval == guitaramp)
{
atypt = atyp[value];
sprintf(atyptext, "%5.5s", atypt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 38, 60);
Text(rp, atyptext, 5);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if (typeval == monoeq) value = value + 0x1c;
if (typeval == stereoeq) value = value + 0x34;
Move(rp, 240, 59);
break;
case VXTHREE_GADGET:
if (typeval == monoeq) value = value + 0x34;
if (typeval == stereoeq) value = value + 0x1c;
Move(rp, 240, 70);
break;
case VXFOUR_GADGET:
if (typeval == crossdelay)
{
inputt = input[value+2];
sprintf(inputtext, "%2.2s", inputt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 55, 82);
Text(rp, inputtext, 2);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if (typeval == autopan)
{
pdirt = pdir[value];
sprintf(pdirtext, "%4.4s", pdirt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 40, 82);
Text(rp, pdirtext, 4);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if ((typeval == karaoke1)|(typeval == karaoke2)|(typeval == karaoke3)) value = value + 0x22;
if (typeval == monoeq) value = value + 0x0a;
if (typeval == stereoeq) value = value + 0x34;
Move(rp, 240, 81);
break;
case VXFIVE_GADGET:
if ((typeval == hall1)|(typeval == hall2)|(typeval == room1)|(typeval == room2)|(typeval == room3)|
(typeval == stage1)|(typeval == stage2)|(typeval == plate)) value = value + 0x22;
else if (typeval == monoeq) value = value + 0x34;
Move(rp, 240, 92);
break;
case VXSIX_GADGET:
if ((typeval == chorus1)|(typeval == chorus2)|(typeval == chorus3)|(typeval == chorus4)|
(typeval == celeste1)|(typeval == celeste2)|(typeval == celeste3)|(typeval == celeste4)|
(typeval == flanger1)|(typeval == flanger2)|(typeval == flanger3)|(typeval == symphonic)|
(typeval == rotaryspeaker)|(typeval == tremolo)|(typeval == autopan)|
(typeval == phaser1)|(typeval == phaser2)) value = value + 0x08;
if (typeval == monoeq) value = value + 0x08;
Move(rp, 240, 103);
break;
case VXSEVEN_GADGET:
if ((typeval == earlyrefl1)|(typeval == earlyrefl2)|
(typeval == gatereverb)|(typeval == reversegate)) value = value + 0x22;
if ((typeval == chorus1)|(typeval == chorus2)|(typeval == chorus3)|(typeval == chorus4)|
(typeval == celeste1)|(typeval == celeste2)|(typeval == celeste3)|(typeval == celeste4)|
(typeval == flanger1)|(typeval == flanger2)|(typeval == flanger3)|(typeval == symphonic)|
(typeval == rotaryspeaker)|(typeval == tremolo)|(typeval == autopan)|
(typeval == phaser1)|(typeval == phaser2)) value = value + 0x34;
if (typeval == monoeq) value = value + 0x1c;
Move(rp, 240, 114);
break;
case VXEIGHT_GADGET:
if ((typeval == chorus1)|(typeval == chorus2)|(typeval == chorus3)|(typeval == chorus4)|
(typeval == celeste1)|(typeval == celeste2)|(typeval == celeste3)|(typeval == celeste4)|
(typeval == flanger1)|(typeval == flanger2)|(typeval == flanger3)|(typeval == symphonic)|
(typeval == rotaryspeaker)|(typeval == tremolo)|(typeval == autopan)|
(typeval == phaser1)|(typeval == phaser2)) value = value + 0x1c;
Move(rp, 240, 125);
break;
case VXNINE_GADGET:
if ((typeval == chorus1)|(typeval == chorus2)|(typeval == chorus3)|(typeval == chorus4)|
(typeval == celeste1)|(typeval == celeste2)|(typeval == celeste3)|(typeval == celeste4)|
(typeval == flanger1)|(typeval == flanger2)|(typeval == flanger3)|(typeval == symphonic)|
(typeval == rotaryspeaker)|(typeval == tremolo)|(typeval == autopan)|
(typeval == phaser1)|(typeval == phaser2)) value = value + 0x34;
Move(rp, 240, 136);
break;
case VXTEN_GADGET:
Move(rp, 240, 147);
break;
case VXELEVEN_GADGET:
Move(rp, 240, 158);
break;
case VXTWELVE_GADGET:
Move(rp, 240, 169);
break;
case VXTHIRTEEN_GADGET:
Move(rp, 240, 180);
break;
case VXFOURTEEN_GADGET:
Move(rp, 240, 191);
break;
case VXFIFTEEN_GADGET:
if ((typeval == phaser1)|(typeval == phaser2)) value = value + 0x03;
Move(rp, 240, 202);
break;
case VXSIXTEEN_GADGET:
Move(rp, 240, 213);
break;
case VXSEVENTEEN_GADGET:
if ((typeval == delaylcr)|(typeval == delaylr)|(typeval == echo)|(typeval == crossdelay)) value = value + 0x08;
if ((typeval == phaser1)|(typeval == phaser2)) value = value + 0x04;
Move(rp, 240, 224);
break;
case VXEIGHTEEN_GADGET:
if ((typeval == delaylcr)|(typeval == delaylr)|(typeval == echo)|(typeval == crossdelay)) value = value + 0x34;
if ((value == flanger1)|(value == flanger3))value = value + 0x04;
if (typeval == tremolo) value = value + 0x04;
Move(rp, 240, 235);
break;
case VXNINETEEN_GADGET:
if ((typeval == chorus1)|(typeval == chorus2)|(typeval == chorus3)|(typeval == chorus4)|
(typeval == celeste1)|(typeval == celeste2)|(typeval == celeste3)|(typeval == celeste4)|(typeval == tremolo))
{
inputt = input[value];
sprintf(inputtext, "%2.2s", inputt);
SetAPen(rp, 6);
SetBPen(rp, 7);
SetDrMd(rp, INVERSVID|JAM2);
Move(rp, 55, 247);
Text(rp, inputtext, 2);
SetAPen(rp, 2);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
}
if ((typeval == delaylcr)|(typeval == delaylr)|(typeval == echo)|(typeval == crossdelay)) value = value + 0x1c;
Move(rp, 240, 246);
break;
case VXTWENTY_GADGET:
if ((typeval == delaylcr)||(typeval == delaylr)||(typeval == echo)||(typeval == crossdelay)) value = value + 0x34;
Move(rp, 240, 257);
break;
default:
break;
}
SetAPen(rp, 1);
SetBPen(rp, 0);
SetDrMd(rp, JAM2);
sprintf(text, "%3ld", value);
Text(rp, text, 3);
return value;
}
//to hear the changes
static void send_note(struct VXXGTool *tool, const long time, const UBYTE note)
{
struct NoteEvent *on_event = (struct NoteEvent *)(*functions->allocevent)();
if (on_event)
{
struct NoteEvent *off_event = (struct NoteEvent *)(*functions->allocevent)();
if (off_event)
{
on_event->next =
off_event->next = NULL;
on_event->type =
off_event->type = EVENT_VOICE;
on_event->status = MIDI_NOTEON;
off_event->status = MIDI_NOTEOFF;
on_event->value =
off_event->value = note;
on_event->velocity = 80;
on_event->time = time;
off_event->time = time + 96;
on_event->tool =
off_event->tool = tool->tool.next;
(*functions->qevent)(on_event);
(*functions->qevent)(off_event);
}
else
{
(*functions->freeevent)(on_event);
}
}
}
static void initvalues(struct Window *window, struct VXXGTool *tool, int init, UBYTE initswich)
{
int i,a,b = init*20;
//initialvalues for the sliders
UBYTE initval[]={
// 42 44 46 48 4a 4c 4e 50 52 54 56 57 58 59 70 71 72 73 74 75
0x12,0x0a,0x08,0x0d,0x0f,0x00,0x00,0x00,0x00,0x28,0x40,0x40,0x00,0x00,0x00,0x04,0x32,0x40,0x40,0x00, //Hall1
0x19,0x0a,0x1c,0x06,0x0c,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x0d,0x03,0x4a,0x40,0x40,0x00, //Hall2
0x05,0x0a,0x10,0x04,0x0f,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x05,0x03,0x40,0x40,0x40,0x00, //Room1
0x0c,0x0a,0x05,0x04,0x04,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x03,0x32,0x40,0x40,0x00, //Room2
0x09,0x0a,0x2f,0x05,0x02,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x03,0x3c,0x40,0x40,0x00, //Room3
0x13,0x0a,0x10,0x07,0x14,0x00,0x00,0x00,0x00,0x28,0x40,0x40,0x00,0x00,0x00,0x03,0x40,0x40,0x40,0x00, //Stage1
0x0b,0x0a,0x10,0x07,0x11,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x02,0x02,0x40,0x40,0x40,0x00, //Stage2
0x19,0x0a,0x06,0x08,0x0f,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x02,0x03,0x40,0x40,0x40,0x00, //Plate
0x1a,0x0d,0x27,0x27,0x4a,0x64,0x0a,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x00,0x00,0x14,0x0c,0x12,0x0c, //Delay LCR
0x13,0x1d,0x1d,0x1d,0x57,0x0a,0x00,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x00,0x00,0x14,0x0c,0x12,0x0c, //Delay LR
0x0d,0x50,0x0d,0x50,0x0a,0x0d,0x0d,0x00,0x00,0x28,0x40,0x40,0x00,0x00,0x00,0x00,0x14,0x0c,0x12,0x0c, //Echo
0x0d,0x0d,0x6f,0x01,0x0a,0x00,0x00,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x00,0x00,0x14,0x0c,0x12,0x0c, //Cross Delay
0x00,0x13,0x05,0x10,0x40,0x00,0x0c,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00, //Early Reflection 1
0x00,0x13,0x05,0x10,0x40,0x00,0x0c,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00, //Early Reflection 2
0x00,0x0f,0x06,0x02,0x40,0x00,0x0a,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x04,0x03,0x0a,0x00,0x00,0x00, //Gate Reverb
0x00,0x0f,0x06,0x02,0x40,0x00,0x0d,0x00,0x00,0x20,0x40,0x40,0x00,0x00,0x04,0x03,0x0a,0x00,0x00,0x00, //Reverse Gate
0x3f,0x61,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Karaoke 1
0x37,0x69,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Karaoke 2
0x2b,0x6e,0x0e,0x13,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Karaoke 3
0x06,0x36,0x4d,0x6a,0x00,0x14,0x0c,0x12,0x0c,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Chorus 1
0x08,0x3f,0x40,0x1e,0x00,0x14,0x0a,0x0e,0x06,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Chorus 2
0x04,0x2c,0x40,0x6e,0x00,0x14,0x0c,0x12,0x0e,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Chorus 3
0x07,0x20,0x45,0x68,0x00,0x14,0x0c,0x12,0x0c,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Chorus 4
0x0c,0x20,0x40,0x00,0x00,0x14,0x0c,0x12,0x0c,0x7f,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Celeste 1
0x1c,0x12,0x5a,0x02,0x00,0x14,0x0a,0x0e,0x08,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Celeste 2
0x04,0x3f,0x2c,0x02,0x00,0x14,0x0c,0x12,0x10,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Celeste 3
0x07,0x1d,0x40,0x00,0x00,0x14,0x0c,0x17,0x0e,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00, //Celeste 4
// 42 44 46 48 4a 4c 4e 50 52 54 56 57 58 59 70 71 72 73 74 75
0x0e,0x0e,0x68,0x02,0x00,0x14,0x0c,0x12,0x0c,0x60,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Flanger 1
0x20,0x11,0x1a,0x02,0x00,0x14,0x0c,0x12,0x08,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Flanger 2
0x03,0x6d,0x6d,0x02,0x00,0x14,0x0c,0x12,0x0c,0x60,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Flanger 3
0x0c,0x19,0x10,0x00,0x00,0x1c,0x0c,0x12,0x0c,0x7f,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Symphonic
0x51,0x23,0x00,0x00,0x00,0x18,0x08,0x11,0x02,0x7f,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Rotary Speaker
0x53,0x38,0x00,0x00,0x00,0x1c,0x08,0x12,0x0c,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, //Tremolo
0x4c,0x50,0x20,0x05,0x00,0x1c,0x0c,0x12,0x0c,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Auto Pan
0x08,0x6f,0x4a,0x68,0x00,0x14,0x0c,0x12,0x0c,0x40,0x40,0x40,0x00,0x00,0x06,0x01,0x40,0x00,0x00,0x00, //Phaser 1
0x08,0x6f,0x4a,0x6c,0x00,0x14,0x0c,0x12,0x0c,0x40,0x00,0x00,0x00,0x00,0x05,0x01,0x04,0x00,0x00,0x00, //Phaser 1
0x28,0x0c,0x14,0x13,0x30,0x00,0x0f,0x16,0x00,0x7f,0x40,0x40,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00, //Distortion
0x1d,0x10,0x10,0x0b,0x37,0x00,0x0d,0x14,0x00,0x7f,0x00,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00, //Overdrive
0x27,0x01,0x0e,0x2d,0x37,0x00,0x00,0x00,0x00,0x7f,0x40,0x40,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, //Guitar Amp
0x46,0x38,0x27,0x0f,0x00,0x14,0x0e,0x13,0x0c,0x7f,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //Auto Wah
0x12,0x06,0x08,0x00,0x12,0x14,0x12,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //3-Band Equalizer (mono)
0x14,0x12,0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; //2-Band Equalizer (stereo)
//rangevalues for the sliders
UBYTE range[]={
// 42 44 46 48 4a 4c 4e 50 52 54 56 57 58 59 70 71 72 73 74 75
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Hall1
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Hall2
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Room1
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Room2
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Room3
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Stage1
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Stage2
0x46,0x0b,0x40,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x05,0x80,0x80,0x80,0x80, //Plate
0x80,0x80,0x80,0x80,0x80,0x80,0x0a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19, //Delay LCR
0x80,0x80,0x80,0x80,0x80,0x0a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19, //Delay LR
0x80,0x80,0x80,0x80,0x0a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19, //Echo
0x80,0x80,0x80,0x03,0x80,0x0a,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19, //Cross Delay
0x06,0x2d,0x0b,0x40,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0b,0x04,0x0a,0x80,0x80,0x80, //Early Reflection 1
0x06,0x2d,0x0b,0x40,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0b,0x04,0x0a,0x80,0x80,0x80, //Early Reflection 2
0x02,0x2d,0x0b,0x40,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0b,0x04,0x0a,0x80,0x80,0x80, //Gate Reverb
0x02,0x2d,0x0b,0x40,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0b,0x04,0x0a,0x80,0x80,0x80, //Reverse Gate
0x80,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Karaoke 1
0x80,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Karaoke 2
0x80,0x80,0x35,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Karaoke 3
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Chorus 1
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Chorus 2
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Chorus 3
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Chorus 4
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Celeste 1
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Celeste 2
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Celeste 3
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x02,0x80, //Celeste 1
0x80,0x80,0x80,0x40,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x78,0x80,0x80, //Flanger 1
0x80,0x80,0x80,0x40,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x78,0x80,0x80, //Flanger 2
0x80,0x80,0x80,0x40,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x78,0x80,0x80, //Flanger 3
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Symphonic
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Rotary Speaker
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x78,0x02,0x80, //Tremolo
0x80,0x80,0x80,0x06,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Auto Pan
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x07,0x07,0x78,0x80,0x80,0x80, //Phaser 1
0x80,0x80,0x80,0x80,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x07,0x07,0x78,0x80,0x80,0x80, //Phaser 2
0x80,0x21,0x19,0x1b,0x80,0x80,0x1b,0x19,0x6e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Distortion
0x80,0x21,0x19,0x1b,0x80,0x80,0x1b,0x19,0x6e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Overdrive
0x80,0x04,0x1b,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Guitar Amp
0x80,0x80,0x80,0x6e,0x80,0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //Auto Wah
0x19,0x1f,0x21,0x6e,0x19,0x21,0x1f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, //3-Band Equalizer (mono)
0x21,0x19,0x1f,0x19,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80}; //2-Band Equalizer (stereo)
if (initswich == 1)
{
tool->vrfxone = initval[0+b];
tool->vrfxtwo = initval[1+b];
tool->vrfxthree = initval[2+b];
tool->vrfxfour = initval[3+b];
tool->vrfxfive = initval[4+b];
tool->vrfxsix = initval[5+b];
tool->vrfxseven = initval[6+b];
tool->vrfxeight = initval[7+b];
tool->vrfxnine = initval[8+b];
tool->vrfxten = initval[9+b];
tool->vrfxeleven = initval[10+b];
tool->vrfxtwelve = initval[11+b];
tool->vrfxthirteen = initval[12+b];
tool->vrfxfourteen = initval[13+b];
tool->vrfxfifteen = initval[14+b];
tool->vrfxsixteen = initval[15+b];
tool->vrfxseventeen = initval[16+b];
tool->vrfxeighteen = initval[17+b];
tool->vrfxnineteen = initval[18+b];
tool->vrfxtwenty = initval[19+b];
}
(*functions->ModifyEmbossedProp)(window, VXONE_GADGET, (LONG)tool->vrfxone, 0, (LONG)range[0+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTWO_GADGET, (LONG)tool->vrfxtwo, 0, (LONG)range[1+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTHREE_GADGET, (LONG)tool->vrfxthree, 0, (LONG)range[2+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXFOUR_GADGET, (LONG)tool->vrfxfour, 0, (LONG)range[3+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXFIVE_GADGET, (LONG)tool->vrfxfive, 0, (LONG)range[4+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXSIX_GADGET, (LONG)tool->vrfxsix, 0, (LONG)range[5+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXSEVEN_GADGET, (LONG)tool->vrfxseven, 0, (LONG)range[6+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXEIGHT_GADGET, (LONG)tool->vrfxeight, 0, (LONG)range[7+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXNINE_GADGET, (LONG)tool->vrfxnine, 0, (LONG)range[8+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTEN_GADGET, (LONG)tool->vrfxten, 0, (LONG)range[9+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXELEVEN_GADGET, (LONG)tool->vrfxeleven, 0, (LONG)range[10+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTWELVE_GADGET, (LONG)tool->vrfxtwelve, 0, (LONG)range[11+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTHIRTEEN_GADGET, (LONG)tool->vrfxthirteen, 0, (LONG)range[12+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXFOURTEEN_GADGET, (LONG)tool->vrfxfourteen, 0, (LONG)range[13+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXFIFTEEN_GADGET, (LONG)tool->vrfxfifteen, 0, (LONG)range[14+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXSIXTEEN_GADGET, (LONG)tool->vrfxsixteen, 0, (LONG)range[15+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXSEVENTEEN_GADGET, (LONG)tool->vrfxseventeen,0, (LONG)range[16+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXEIGHTEEN_GADGET, (LONG)tool->vrfxeighteen, 0, (LONG)range[17+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXNINETEEN_GADGET, (LONG)tool->vrfxnineteen, 0, (LONG)range[18+b], 0, 0, 0);
(*functions->ModifyEmbossedProp)(window, VXTWENTY_GADGET, (LONG)tool->vrfxtwenty, 0, (LONG)range[19+b], 0, 0, 0);
for (i = VXONE_GADGET; i<=VXTWENTY_GADGET; i +=3)
{
(*functions->DrawEmbossedProp)(window, i);
}
}
//the center off all
static void __saveds edittoolcode(struct VXXGTool *tool)
{
struct IntuiMessage *message;
struct Window *window;
LONG class, code, time;
struct Gadget *gadget;
struct NewWindow *newwindow;
int i, ini, vrfxres=0;
UBYTE MS, LS;
char *storagebt, *MSB;
char storage1[32];
char storage2[32];
char storage3[32];
char storage4[32];
char storage5[32];
char storage6[32];
char storage7[32];
char storage8[32];
char storage9[32];
char storage10[32];
char storage11[32];
char storage12[32];
char storage13[32];
char storage14[32];
char storage15[32];
char storage16[32];
char storage17[32];
char storage18[32];
char storage19[32];
char storage20[32];
char storage21[32];
VXXGNewWindowStructure1.Screen = functions->screen;
if (tool->tool.touched & TOUCH_EDIT)
{
VXXGNewWindowStructure1.LeftEdge = tool->tool.left;
VXXGNewWindowStructure1.TopEdge = tool->tool.top;
VXXGNewWindowStructure1.Width = tool->tool.width;
VXXGNewWindowStructure1.Height = tool->tool.height;
}
if (!tool->tool.touched)
{
VXXG_tool_init(tool);
}
newwindow = (struct NewWindow *) (*functions->DupeNewWindow)(&VXXGNewWindowStructure1);
if (!newwindow)
{
return;
}
newwindow->Title = 0;
newwindow->Flags |= BORDERLESS;
newwindow->Flags &= ~0xF;
newwindow->BlockPen = 0;
newwindow->DetailPen = 0;
window = (struct Window *) (*functions->FlashyOpenWindow)(newwindow);
if (!window) return;
tool->tool.window = window;
(*functions->EmbossWindowOn)(window, WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG, VXXG_NAME, (short)-1, (short)-1, 0, 0);
(*functions->FatEmbossedPropOn)(window, VXTYPE_GADGET, VXTYPEDOWN_GADGET,
VXTYPEUP_GADGET, (void *)display_routine, 42, 1);
(*functions->FatEmbossedPropOn)(window, VXONE_GADGET, VXONEDOWN_GADGET,
VXONEUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTWO_GADGET, VXTWODOWN_GADGET,
VXTWOUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTHREE_GADGET, VXTHREEDOWN_GADGET,
VXTHREEUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXFOUR_GADGET, VXFOURDOWN_GADGET,
VXFOURUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXFIVE_GADGET, VXFIVEDOWN_GADGET,
VXFIVEUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXSIX_GADGET, VXSIXDOWN_GADGET,
VXSIXUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXSEVEN_GADGET, VXSEVENDOWN_GADGET,
VXSEVENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXEIGHT_GADGET, VXEIGHTDOWN_GADGET,
VXEIGHTUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXNINE_GADGET, VXNINEDOWN_GADGET,
VXNINEUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTEN_GADGET, VXTENDOWN_GADGET,
VXTENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXELEVEN_GADGET, VXELEVENDOWN_GADGET,
VXELEVENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTWELVE_GADGET, VXTWELVEDOWN_GADGET,
VXTWELVEUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTHIRTEEN_GADGET, VXTHIRTEENDOWN_GADGET,
VXTHIRTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXFOURTEEN_GADGET, VXFOURTEENDOWN_GADGET,
VXFOURTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXFIFTEEN_GADGET, VXFIFTEENDOWN_GADGET,
VXFIFTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXSIXTEEN_GADGET, VXSIXTEENDOWN_GADGET,
VXSIXTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXSEVENTEEN_GADGET, VXSEVENTEENDOWN_GADGET,
VXSEVENTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXEIGHTEEN_GADGET, VXEIGHTEENDOWN_GADGET,
VXEIGHTEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXNINETEEN_GADGET, VXNINETEENDOWN_GADGET,
VXNINETEENUP_GADGET, (void *)display_routine, 128, 1);
(*functions->FatEmbossedPropOn)(window, VXTWENTY_GADGET, VXTWENTYDOWN_GADGET,
VXTWENTYUP_GADGET, (void *)display_routine, 128, 1);
(*functions->EmbossOn)(window, WRITE_GADGET, 1);
(*functions->ModifyEmbossedProp)(window, VXTYPE_GADGET, (LONG)tool->vrfxtype, 0, 0, 0, 0, 0);
(*functions->DrawEmbossedProp)(window, VXTYPE_GADGET);
ini = (int)tool->vrfxtype;
initvalues(window, tool, ini, 0);
send_note(tool, functions->timenow, 60);
for (;;)
{
message = (struct IntuiMessage *) (*functions->GetIntuiMessage)(window);
class = message->Class;
code = message->Code;
gadget = (struct Gadget *) message->IAddress;
class = (*functions->SystemGadgets)(window, class, gadget, code);
ReplyMsg((struct Message *)message);
if (class == CLOSEWINDOW)
{
break;
}
else if (class == GADGETDOWN)
{
const short id = gadget->GadgetID;
time = functions->timenow;
switch (id)
{
case VXTYPE_GADGET:
tool->vrfxtype = (UBYTE) (*functions->DragEmbossedProp)(window, VXTYPE_GADGET);
typeval = tool->vrfxtype;
sprintf(storage1, "F043104C020140%.4sF7",typehexstr[tool->vrfxtype]);
tool->typesysex = storage1;
transsysex(tool, time, tool->typesysex, 1);
ini = (int)tool->vrfxtype;
initvalues(window, tool, ini, 1);
break;
case VXTYPEDOWN_GADGET:
tool->vrfxtype = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTYPE_GADGET, -1, 0);
typeval = tool->vrfxtype;
sprintf(storage1, "F043104C020140%.4sF7",typehexstr[tool->vrfxtype]);
tool->typesysex = storage1;
transsysex(tool, time, tool->typesysex, 1);
ini = (int)tool->vrfxtype;
initvalues(window, tool, ini, 1);
break;
case VXTYPEUP_GADGET:
tool->vrfxtype = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTYPE_GADGET, 1, 0);
typeval = tool->vrfxtype;
sprintf(storage1, "F043104C020140%.4sF7",typehexstr[tool->vrfxtype]);
tool->typesysex = storage1;
transsysex(tool, time, tool->typesysex,1);
ini = (int)tool->vrfxtype;
initvalues(window, tool, ini, 1);
break;
case VXONE_GADGET:
tool->vrfxone = (UBYTE) (*functions->DragEmbossedProp)(window, VXONE_GADGET);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxone;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxone;
LS = 0x05;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxone;
LS = 0x44;
}
if ((tool->vrfxtype == 10)|(tool->vrfxtype == 11))
{
MS = tool->vrfxone;
LS = 0x24;
}
sprintf(storage2, "F043104C020142%02lx%02lxF7",MS,LS);
tool->onesysex = storage2;
transsysex(tool, time, tool->onesysex,1);
break;
case VXONEDOWN_GADGET:
tool->vrfxone = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXONE_GADGET, -1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxone;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxone;
LS = 0x05;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxone;
LS = 0x44;
}
if ((tool->vrfxtype == 10)|(tool->vrfxtype == 11))
{
MS = tool->vrfxone;
LS = 0x24;
}
sprintf(storage2, "F043104C020142%02lx%02lxF7",MS,LS);
tool->onesysex = storage2;
transsysex(tool, time, tool->onesysex,1);
break;
case VXONEUP_GADGET:
tool->vrfxone = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXONE_GADGET, 1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxone;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxone;
LS = 0x05;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxone;
LS = 0x44;
}
if ((tool->vrfxtype == 10)|(tool->vrfxtype == 11))
{
MS = tool->vrfxone;
LS = 0x24;
}
sprintf(storage2, "F043104C020142%02lx%02lxF7",MS,LS);
tool->onesysex = storage2;
transsysex(tool, time, tool->onesysex,1);
break;
case VXTWO_GADGET:
tool->vrfxtwo = (UBYTE) (*functions->DragEmbossedProp)(window, VXTWO_GADGET);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxtwo;
LS = 0x03;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxtwo;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 11)
{
MS = tool->vrfxtwo;
LS = 0x56;
}
sprintf(storage3, "F043104C020144%02lx%02lxF7",MS,LS);
tool->twosysex = storage3;
transsysex(tool, time, tool->twosysex,1);
break;
case VXTWODOWN_GADGET:
tool->vrfxtwo = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWO_GADGET, -1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxtwo;
LS = 0x03;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxtwo;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 11)
{
MS = tool->vrfxtwo;
LS = 0x56;
}
sprintf(storage3, "F043104C020144%02lx%02lxF7",MS,LS);
tool->twosysex = storage3;
transsysex(tool, time, tool->twosysex,1);
break;
case VXTWOUP_GADGET:
tool->vrfxtwo = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWO_GADGET, 1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxtwo;
LS = 0x03;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxtwo;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxtwo;
}
if (tool->vrfxtype == 11)
{
MS = tool->vrfxtwo;
LS = 0x56;
}
sprintf(storage3, "F043104C020144%02lx%02lxF7",MS,LS);
tool->twosysex = storage3;
transsysex(tool, time, tool->twosysex,1);
break;
case VXTHREE_GADGET:
tool->vrfxthree = (UBYTE) (*functions->DragEmbossedProp)(window, VXTHREE_GADGET);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxthree;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxthree;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxthree;
LS = 0x28;
}
if (tool->vrfxtype == 10)
{
MS = tool->vrfxthree;
LS = 0x74;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxthree;
}
sprintf(storage4, "F043104C020146%02lx%02lxF7",MS,LS);
tool->threesysex = storage4;
transsysex(tool, time, tool->threesysex,1);
break;
case VXTHREEDOWN_GADGET:
tool->vrfxthree = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTHREE_GADGET, -1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxthree;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxthree;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxthree;
LS = 0x28;
}
if (tool->vrfxtype == 10)
{
MS = tool->vrfxthree;
LS = 0x74;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxthree;
}
sprintf(storage4, "F043104C020146%02lx%02lxF7",MS,LS);
tool->threesysex = storage4;
transsysex(tool, time, tool->threesysex,1);
break;
case VXTHREEUP_GADGET:
tool->vrfxthree = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTHREE_GADGET, 1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxthree;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxthree;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxthree;
LS = 0x28;
}
if (tool->vrfxtype == 10)
{
MS = tool->vrfxthree;
LS = 0x74;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxthree;
}
sprintf(storage4, "F043104C020146%02lx%02lxF7",MS,LS);
tool->threesysex = storage4;
transsysex(tool, time, tool->threesysex,1);
break;
case VXFOUR_GADGET:
tool->vrfxfour = (UBYTE) (*functions->DragEmbossedProp)(window, VXFOUR_GADGET);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxfour;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxfour;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxfour;
}
sprintf(storage5, "F043104C020148%02lx%02lxF7",MS,LS);
tool->foursysex = storage5;
transsysex(tool, time, tool->foursysex,1);
break;
case VXFOURDOWN_GADGET:
tool->vrfxfour = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFOUR_GADGET, -1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxfour;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxfour;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxfour;
}
sprintf(storage5, "F043104C020148%02lx%02lxF7",MS,LS);
tool->foursysex = storage5;
transsysex(tool, time, tool->foursysex,1);
break;
case VXFOURUP_GADGET:
tool->vrfxfour = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFOUR_GADGET, 1, 0);
if ((tool->vrfxtype < 8)|(tool->vrfxtype > 11))
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 8)
{
MS = tool->vrfxfour;
LS = 0x08;
}
if (tool->vrfxtype == 9)
{
MS = tool->vrfxfour;
LS = 0x26;
}
if (tool->vrfxtype == 10)
{
MS = 0;
LS = tool->vrfxfour;
}
if (tool->vrfxtype == 11)
{
MS = 0;
LS = tool->vrfxfour;
}
sprintf(storage5, "F043104C020148%02lx%02lxF7",MS,LS);
tool->foursysex = storage5;
transsysex(tool, time, tool->foursysex,1);
break;
case VXFIVE_GADGET:
tool->vrfxfive = (UBYTE) (*functions->DragEmbossedProp)(window, VXFIVE_GADGET);
sprintf(storage6, "F043104C02014a00%02lxF7", tool->vrfxfive);
tool->fivesysex = storage6;
transsysex(tool, time, tool->fivesysex,1);
break;
case VXFIVEDOWN_GADGET:
tool->vrfxfive = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFIVE_GADGET, -1, 0);
sprintf(storage6, "F043104C02014a00%02lxF7",tool->vrfxfive);
tool->fivesysex = storage6;
transsysex(tool, time, tool->fivesysex,1);
break;
case VXFIVEUP_GADGET:
tool->vrfxfive = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFIVE_GADGET, 1, 0);
sprintf(storage6, "F043104C02014a00%02lxF7",tool->vrfxfive);
tool->fivesysex = storage6;
transsysex(tool, time, tool->fivesysex,1);
break;
case VXSIX_GADGET:
tool->vrfxsix = (UBYTE) (*functions->DragEmbossedProp)(window, VXSIX_GADGET);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxsix;
LS = 0x24;
}
else if (tool->vrfxtype == 11)
{
MS = tool->vrfxsix;
LS = 0x20;
}
else
{
MS = 0x00;
LS = tool->vrfxsix;
}
sprintf(storage7, "F043104C02014c%02lx%02lxF7",MS,LS);
tool->sixsysex = storage7;
transsysex(tool, time, tool->sixsysex,1);
break;
case VXSIXDOWN_GADGET:
tool->vrfxsix = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSIX_GADGET, -1, 0);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxsix;
LS = 0x24;
}
else if (tool->vrfxtype == 11)
{
MS = tool->vrfxsix;
LS = 0x20;
}
else
{
MS = 0x00;
LS = tool->vrfxsix;
}
sprintf(storage7, "F043104C02014c%02lx%02lxF7",MS,LS);
tool->sixsysex = storage7;
transsysex(tool, time, tool->sixsysex,1);
break;
case VXSIXUP_GADGET:
tool->vrfxsix = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSIX_GADGET, 1, 0);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxsix;
LS = 0x24;
}
else if (tool->vrfxtype == 11)
{
MS = tool->vrfxsix;
LS = 0x20;
}
else
{
MS = 0x00;
LS = tool->vrfxsix;
}
sprintf(storage7, "F043104C02014c%02lx%02lxF7",MS,LS);
tool->sixsysex = storage7;
transsysex(tool, time, tool->sixsysex,1);
break;
case VXSEVEN_GADGET:
tool->vrfxseven = (UBYTE) (*functions->DragEmbossedProp)(window, VXSEVEN_GADGET);
if (tool->vrfxtype == 8)
{
MS = 0;
LS = tool->vrfxseven;
}
else if (tool->vrfxtype == 10)
{
MS = tool->vrfxseven;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxseven;
}
sprintf(storage8, "F043104C02014e%02lx%02lxF7",MS,LS);
tool->sevensysex = storage8;
transsysex(tool, time, tool->sevensysex,1);
break;
case VXSEVENDOWN_GADGET:
tool->vrfxseven = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSEVEN_GADGET, -1, 0);
if (tool->vrfxtype == 8)
{
MS = 0;
LS = tool->vrfxseven;
}
else if (tool->vrfxtype == 10)
{
MS = tool->vrfxseven;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxseven;
}
sprintf(storage8, "F043104C02014e%02lx%02lxF7",MS,LS);
tool->sevensysex = storage8;
transsysex(tool, time, tool->sevensysex,1);
break;
case VXSEVENUP_GADGET:
tool->vrfxseven = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSEVEN_GADGET, 1, 0);
if (tool->vrfxtype == 8)
{
MS = 0;
LS = tool->vrfxseven;
}
else if (tool->vrfxtype == 10)
{
MS = tool->vrfxseven;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxseven;
}
sprintf(storage8, "F043104C02014e%02lx%02lxF7",MS,LS);
tool->sevensysex = storage8;
transsysex(tool, time, tool->sevensysex,1);
break;
case VXEIGHT_GADGET:
tool->vrfxeight = (UBYTE) (*functions->DragEmbossedProp)(window, VXEIGHT_GADGET);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxeight;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxeight;
}
sprintf(storage9, "F043104C020150%02lx%02lxF7",MS,LS);
tool->eightsysex = storage9;
transsysex(tool, time, tool->eightsysex,1);
break;
case VXEIGHTDOWN_GADGET:
tool->vrfxeight = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXEIGHT_GADGET, -1, 0);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxeight;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxeight;
}
sprintf(storage9, "F043104C020150%02lx%02lxF7",MS,LS);
tool->eightsysex = storage9;
transsysex(tool, time, tool->eightsysex,1);
break;
case VXEIGHTUP_GADGET:
tool->vrfxeight = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXEIGHT_GADGET, 1, 0);
if (tool->vrfxtype == 10)
{
MS = tool->vrfxeight;
LS = 0x74;
}
else
{
MS = 0;
LS = tool->vrfxeight;
}
sprintf(storage9, "F043104C020150%02lx%02lxF7",MS,LS);
tool->eightsysex = storage9;
transsysex(tool, time, tool->eightsysex,1);
break;
case VXNINE_GADGET:
tool->vrfxnine = (UBYTE) (*functions->DragEmbossedProp)(window, VXNINE_GADGET);
sprintf(storage10, "F043104C02015200%02lxF7",tool->vrfxnine);
tool->ninesysex = storage10;
transsysex(tool, time, tool->ninesysex,1);
break;
case VXNINEDOWN_GADGET:
tool->vrfxnine = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXNINE_GADGET, -1, 0);
sprintf(storage10, "F043104C02015200%02lxF7",tool->vrfxnine);
tool->ninesysex = storage10;
transsysex(tool, time, tool->ninesysex,1);
break;
case VXNINEUP_GADGET:
tool->vrfxnine = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXNINE_GADGET, 1, 0);
sprintf(storage10, "F043104C02015200%02lxF7",tool->vrfxnine);
tool->ninesysex = storage10;
transsysex(tool, time, tool->ninesysex,1);
break;
case VXTEN_GADGET:
tool->vrfxten = (UBYTE) (*functions->DragEmbossedProp)(window, VXTEN_GADGET);
sprintf(storage11, "F043104C02015400%02lxF7",tool->vrfxten);
tool->tensysex = storage11;
transsysex(tool, time, tool->tensysex,1);
break;
case VXTENDOWN_GADGET:
tool->vrfxten = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTEN_GADGET, -1, 0);
sprintf(storage11, "F043104C02015400%02lxF7",tool->vrfxten);
tool->tensysex = storage11;
transsysex(tool, time, tool->tensysex,1);
break;
case VXTENUP_GADGET:
tool->vrfxten = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTEN_GADGET, 1, 0);
sprintf(storage11, "F043104C02015400%02lxF7",tool->vrfxten);
tool->tensysex = storage11;
transsysex(tool, time, tool->tensysex,1);
break;
case VXELEVEN_GADGET:
tool->vrfxeleven = (UBYTE) (*functions->DragEmbossedProp)(window, VXELEVEN_GADGET);
sprintf(storage12, "F043104C02056C%02lxF7",tool->vrfxeleven);
tool->elevensysex = storage12;
transsysex(tool, time, tool->elevensysex,1);
break;
case VXELEVENDOWN_GADGET:
tool->vrfxeleven = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXELEVEN_GADGET, -1, 0);
sprintf(storage12, "F043104C020156%02lxF7",tool->vrfxeleven);
tool->elevensysex = storage12;
transsysex(tool, time, tool->elevensysex,1);
break;
case VXELEVENUP_GADGET:
tool->vrfxeleven = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXELEVEN_GADGET, 1, 0);
sprintf(storage12, "F043104C020156%02lxF7",tool->vrfxeleven);
tool->elevensysex = storage12;
transsysex(tool, time, tool->elevensysex,1);
break;
case VXTWELVE_GADGET:
tool->vrfxtwelve = (UBYTE) (*functions->DragEmbossedProp)(window, VXTWELVE_GADGET);
sprintf(storage13, "F043104C020157%02lxF7",tool->vrfxtwelve);
tool->twelvesysex = storage13;
transsysex(tool, time, tool->twelvesysex,1);
break;
case VXTWELVEDOWN_GADGET:
tool->vrfxtwelve = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWELVE_GADGET, -1, 0);
sprintf(storage13, "F043104C020157%02lxF7",tool->vrfxtwelve);
tool->twelvesysex = storage13;
transsysex(tool, time, tool->twelvesysex,1);
break;
case VXTWELVEUP_GADGET:
tool->vrfxtwelve = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWELVE_GADGET, 1, 0);
sprintf(storage13, "F043104C020157%02lxF7",tool->vrfxtwelve);
tool->twelvesysex = storage13;
transsysex(tool, time, tool->twelvesysex,1);
break;
case VXTHIRTEEN_GADGET:
tool->vrfxthirteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXTHIRTEEN_GADGET);
sprintf(storage14, "F043104C020158%02lxF7",tool->vrfxthirteen);
tool->thirteensysex = storage14;
transsysex(tool, time, tool->thirteensysex,1);
break;
case VXTHIRTEENDOWN_GADGET:
tool->vrfxthirteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTHIRTEEN_GADGET, -1, 0);
sprintf(storage14, "F043104C020158%02lxF7",tool->vrfxthirteen);
tool->thirteensysex = storage14;
transsysex(tool, time, tool->thirteensysex,1);
break;
case VXTHIRTEENUP_GADGET:
tool->vrfxthirteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTHIRTEEN_GADGET, 1, 0);
sprintf(storage14, "F043104C020158%02lxF7",tool->vrfxthirteen);
tool->thirteensysex = storage14;
transsysex(tool, time, tool->thirteensysex,1);
break;
case VXFOURTEEN_GADGET:
tool->vrfxfourteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXFOURTEEN_GADGET);
sprintf(storage15, "F043104C020159%02lxF7",tool->vrfxfourteen);
tool->fourteensysex = storage15;
transsysex(tool, time, tool->fourteensysex,1);
break;
case VXFOURTEENDOWN_GADGET:
tool->vrfxthirteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFOURTEEN_GADGET, -1, 0);
sprintf(storage15, "F043104C020159%02lxF7",tool->vrfxfourteen);
tool->fourteensysex = storage15;
transsysex(tool, time, tool->fourteensysex,1);
break;
case VXFOURTEENUP_GADGET:
tool->vrfxthirteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFOURTEEN_GADGET, 1, 0);
sprintf(storage15, "F043104C020159%02lxF7",tool->vrfxfourteen);
tool->fourteensysex = storage15;
transsysex(tool, time, tool->fourteensysex,1);
break;
case VXFIFTEEN_GADGET:
tool->vrfxfifteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXFIFTEEN_GADGET);
sprintf(storage16, "F043104C020170%02lxF7",tool->vrfxfifteen);
tool->fifteensysex = storage16;
transsysex(tool, time, tool->fifteensysex,1);
break;
case VXFIFTEENDOWN_GADGET:
tool->vrfxfifteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFIFTEEN_GADGET, -1, 0);
sprintf(storage16, "F043104C020170%02lxF7",tool->vrfxfifteen);
tool->fifteensysex = storage16;
transsysex(tool, time, tool->fifteensysex,1);
break;
case VXFIFTEENUP_GADGET:
tool->vrfxfifteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXFIFTEEN_GADGET, 1, 0);
sprintf(storage16, "F043104C020170%02lxF7",tool->vrfxfifteen);
tool->fifteensysex = storage16;
transsysex(tool, time, tool->fifteensysex,1);
break;
case VXSIXTEEN_GADGET:
tool->vrfxsixteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXSIXTEEN_GADGET);
sprintf(storage17, "F043104C020171%02lxF7",tool->vrfxsixteen);
tool->sixteensysex = storage17;
transsysex(tool, time, tool->sixteensysex,1);
break;
case VXSIXTEENDOWN_GADGET:
tool->vrfxsixteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSIXTEEN_GADGET, -1, 0);
sprintf(storage17, "F043104C020171%02lxF7",tool->vrfxsixteen);
tool->sixteensysex = storage17;
transsysex(tool, time, tool->sixteensysex,1);
break;
case VXSIXTEENUP_GADGET:
tool->vrfxsixteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSIXTEEN_GADGET, 1, 0);
sprintf(storage17, "F043104C020171%02lxF7",tool->vrfxsixteen);
tool->sixteensysex = storage17;
transsysex(tool, time, tool->sixteensysex,1);
break;
case VXSEVENTEEN_GADGET:
tool->vrfxseventeen = (UBYTE) (*functions->DragEmbossedProp)(window, VXSEVENTEEN_GADGET);
sprintf(storage18, "F043104C020172%02lxF7",tool->vrfxseventeen);
tool->seventeensysex = storage18;
transsysex(tool, time, tool->seventeensysex,1);
break;
case VXSEVENTEENDOWN_GADGET:
tool->vrfxseventeen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSEVENTEEN_GADGET, -1, 0);
sprintf(storage18, "F043104C020172%02lxF7",tool->vrfxseventeen);
tool->seventeensysex = storage18;
transsysex(tool, time, tool->seventeensysex,1);
break;
case VXSEVENTEENUP_GADGET:
tool->vrfxseventeen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXSEVENTEEN_GADGET, 1, 0);
sprintf(storage18, "F043104C020172%02lxF7",tool->vrfxseventeen);
tool->seventeensysex = storage18;
transsysex(tool, time, tool->seventeensysex,1);
break;
case VXEIGHTEEN_GADGET:
tool->vrfxeighteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXEIGHTEEN_GADGET);
sprintf(storage19, "F043104C020173%02lxF7",tool->vrfxeighteen);
tool->eighteensysex = storage19;
transsysex(tool, time, tool->eighteensysex,1);
break;
case VXEIGHTEENDOWN_GADGET:
tool->vrfxeighteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXEIGHTEEN_GADGET, -1, 0);
sprintf(storage19, "F043104C020173%02lxF7",tool->vrfxeighteen);
tool->eighteensysex = storage19;
transsysex(tool, time, tool->eighteensysex,1);
break;
case VXEIGHTEENUP_GADGET:
tool->vrfxeighteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXEIGHTEEN_GADGET, 1, 0);
sprintf(storage19, "F043104C020173%02lxF7",tool->vrfxeighteen);
tool->eighteensysex = storage19;
transsysex(tool, time, tool->eighteensysex,1);
break;
case VXNINETEEN_GADGET:
tool->vrfxnineteen = (UBYTE) (*functions->DragEmbossedProp)(window, VXNINETEEN_GADGET);
sprintf(storage20, "F043104C020174%02lxF7",tool->vrfxnineteen);
tool->nineteensysex = storage20;
transsysex(tool, time, tool->nineteensysex,1);
break;
case VXNINETEENDOWN_GADGET:
tool->vrfxnineteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXNINETEEN_GADGET, -1, 0);
sprintf(storage20, "F043104C020174%02lxF7",tool->vrfxnineteen);
tool->nineteensysex = storage20;
transsysex(tool, time, tool->nineteensysex,1);
break;
case VXNINETEENUP_GADGET:
tool->vrfxnineteen = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXNINETEEN_GADGET, 1, 0);
sprintf(storage20, "F043104C020174%02lxF7",tool->vrfxnineteen);
tool->nineteensysex = storage20;
transsysex(tool, time, tool->nineteensysex,1);
break;
case VXTWENTY_GADGET:
tool->vrfxtwenty = (UBYTE) (*functions->DragEmbossedProp)(window, VXTWENTY_GADGET);
sprintf(storage21, "F043104C020175%02lxF7",tool->vrfxtwenty);
tool->twentysysex = storage21;
transsysex(tool, time, tool->twentysysex,1);
break;
case VXTWENTYDOWN_GADGET:
tool->vrfxtwenty = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWENTY_GADGET, -1, 0);
sprintf(storage21, "F043104C020175%02lxF7",tool->vrfxtwenty);
tool->twentysysex = storage21;
transsysex(tool, time, tool->twentysysex,1);
break;
case VXTWENTYUP_GADGET:
tool->vrfxtwenty = (UBYTE) (*functions->ShiftEmbossedProp)(window, VXTWENTY_GADGET, 1, 0);
sprintf(storage21, "F043104C020175%02lxF7",tool->vrfxtwenty);
tool->twentysysex = storage21;
transsysex(tool, time, tool->twentysysex,1);
break;
case WRITE_GADGET:
if ((*functions->areyousure)("write to track ? Play-pointer on right place ?"))
{
if (!functions->running)
{
time = functions->starttime;
if (tool->typesysex != NULL) transsysex(tool, time, tool->typesysex, 0);
if (tool->onesysex != NULL)transsysex(tool, time+1, tool->onesysex, 0);
if (tool->twosysex != NULL)transsysex(tool, time+2, tool->twosysex, 0);
if (tool->threesysex != NULL)transsysex(tool, time+3, tool->threesysex, 0);
if (tool->foursysex != NULL)transsysex(tool, time+4, tool->foursysex, 0);
if (tool->fivesysex != NULL)transsysex(tool, time+5, tool->fivesysex, 0);
if (tool->sixsysex != NULL)transsysex(tool, time+6, tool->sixsysex, 0);
if (tool->sevensysex != NULL)transsysex(tool, time+7, tool->sevensysex, 0);
if (tool->eightsysex != NULL)transsysex(tool, time+9, tool->eightsysex, 0);
if (tool->ninesysex != NULL)transsysex(tool, time+10, tool->ninesysex, 0);
if (tool->tensysex != NULL)transsysex(tool, time+11, tool->tensysex, 0);
if (tool->elevensysex != NULL)transsysex(tool, time+12, tool->elevensysex, 0);
if (tool->twelvesysex != NULL)transsysex(tool, time+13, tool->twelvesysex, 0);
if (tool->thirteensysex != NULL)transsysex(tool, time+14, tool->thirteensysex, 0);
if (tool->fourteensysex != NULL)transsysex(tool, time+15, tool->fourteensysex, 0);
if (tool->fifteensysex != NULL)transsysex(tool, time+16, tool->fifteensysex, 0);
if (tool->sixteensysex != NULL)transsysex(tool, time+17, tool->sixteensysex, 0);
if (tool->seventeensysex != NULL)transsysex(tool, time+18, tool->seventeensysex, 0);
if (tool->eighteensysex != NULL)transsysex(tool, time+19, tool->eighteensysex, 0);
if (tool->nineteensysex != NULL)transsysex(tool, time+20, tool->nineteensysex, 0);
if (tool->twentysysex != NULL)transsysex(tool, time+21, tool->twentysysex, 0);
}
}
else {
// nothing
}
break;
}
send_note(tool, functions->timenow, 60);
}
else if (class == GADGETUP)
{
// Nothing.
}
}
tool->tool.window = 0;
tool->tool.left = window->LeftEdge;
tool->tool.top = window->TopEdge;
tool->tool.width = window->Width;
tool->tool.height = window->Height;
tool->tool.touched = TOUCH_INIT | TOUCH_EDIT;
for (i = VXONE_GADGET; i <= VXTWENTY_GADGET; i +=3)
{
(*functions->FatEmbossedPropOff)(window, i, i+1, i+2);
}
(*functions->EmbossOff)(window, WRITE_GADGET);
(*functions->EmbossWindowOff)(window);
(*functions->FlashyCloseWindow)(window);
(*functions->DeleteNewWindow)(newwindow);
}
//to leave the tool correct
void __saveds removetool()
{
FreeVec(VXXG);
}
//start of the tool
struct ToolMaster *
inittoolmaster()
{
if (!(VXXG=(UWORD *)AllocVec(sizeof (VXXGdata), MEMF_CHIP|MEMF_CLEAR))) return(NULL);
CopyMem(&VXXGdata, VXXG, sizeof (VXXGdata));
memset((char *)&master, 0, sizeof(struct ToolMaster));
VXXG_image.ImageData = VXXG;
master.toolid = VXXG_ID;
master.image = &VXXG_image;
strcpy(master.name, VXXG_NAME);
master.edittool = edittoolcode;
master.processevent = processeventcode;
master.tooltype = VXXG_TYPE;
master.toolsize = sizeof(struct VXXGTool);
master.removetool = removetool;
return(&master);
}